<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>贷你盈新年定制贺卡</title>
<link rel="stylesheet" href="../../www/Public/Special/Css/Monkey/monkey.css" />
<link rel="stylesheet" type="text/css" href="../../www/Public/Special/Css/Monkey/component.css" />
<script type="text/javascript" src="../../www/Public/Special/Js/Monkey/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../../www/Public/Special/Js/Monkey/component.js"></script>
<script type="text/javascript" src="../../www/Public/Js/ajaxfileupload.js"></script>
	<script src=" https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript">
		wx.config({

			debug: false,//这里是开启测试，如果设置为true，则打开每个步骤，都会有提示，是否成功或者失败
			appId: 'wx56b3166a3ae04149', // 必填，公众号的唯一标识
			timestamp: "{$weixin['time']}", // 必填，生成签名的时间戳
			nonceStr: "{$weixin['noncestr']}", // 必填，生成签名的随机串
			signature: "{$weixin['signature']}",// 必填，签名，见附录1
			jsApiList: [
				// 所有要调用的 API 都要加到这个列表中
				'onMenuShareTimeline',
				'onMenuShareAppMessage'
			]
		});
		wx.ready(function () {
			wx.onMenuShareTimeline({
				title: "有人@你，新春到福气到！", // 分享标题
				link: "https://www.dadijinrong.com/Special/imgsc1", // 分享链接
				imgUrl: "https://www.dadijinrong.com/Public/Special/Img/Monkey/monky.png", // 分享图标
				success: function () {
					// 用户确认分享后执行的回调函数
					//window.location.href="http://{$url}/lashou/invitefriends_success/code/{$m_id}/cct_id/{$cct_id}";
				},
				cancel: function () {
					// 用户取消分享后执行的回调函数
					alert('取消分享')
				}
			});
			wx.onMenuShareAppMessage({
				title: "有人@你，新春到福气到！", // 分享标题
				desc: "好友为您制作的福气贺卡来啦！打开福气卡，财源滚滚来", // 分享描述
				link: "https://www.dadijinrong.com/Special/imgsc1", // 分享链接
				imgUrl: "https://www.dadijinrong.com/Public/Special/Img/Monkey/monky.png", // 分享图标
				type: 'link', // 分享类型,music、video或link，不填默认为link
				dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
				success: function () {
					// 用户确认分享后执行的回调函数
					//window.location.href="http://{$url}/lashou/invitefriends_success";
				},
				cancel: function () {
					// 用户取消分享后执行的回调函数
				}
			});

		});
	</script>
<script type="text/javascript">

    $(function(){
		var image1 ="{$imageinfo}";
    	var canvas = document.getElementById("scd");
		var ctx = canvas.getContext("2d");
		//ctx.clearRect(0, 0, canvas.width, canvas.height); 
		var image = new Image();
		image.src=image1;
		image.onload = function() {
		    console.log("height "+this.height+' width '+this.width);
		    canvas.width=this.width; //这样就直接将canvas的大小设置为image的大小
		    canvas.height=this.height;
		    ctx.drawImage(this, 0, 0,this.width,this.height);
		};
    })
    
</script>
</head>
<body>
<div class="tcc">
	<img class="tc" width="100%" src="../../www/Public/Special/Img/Monkey/10.png"/>
</div>	
<div style="margin :0px auto;">	
	<div class="bk1">
		<!--<img id="scd" alt="" />-->
		<canvas id="scd" width="100%" height="100%"></canvas>
	</div>
	<img class="imgL" width="31.3%" src="../../www/Public/Special/Img/Monkey/04.png" alt="" />
	<img class="imgR" width="30.6%" src="../../www/Public/Special/Img/Monkey/05.png" alt="" />
	<img class="imgC" width="100%" src="../../www/Public/Special/Img/Monkey/06.png" alt="" />
	<div class="bj">
		<textarea class="bj1" readonly='readonly' wrap="physical" placeholder="金猴献瑞财源广 大地年年硕果丰 ——贷你盈（点击填写祝福）" >{$sharecontent}</textarea>
		<img style="float: left;" width="100%" src="../../www/Public/Special/Img/Monkey/07.png" alt="" />
	</div>
	<!--制作我的贺卡-->
	<a href="{:U('Special/imgsc')}"><img class="zzhk" width="70%" src="../../www/Public/Special/Img/Monkey/s05.png" alt="" /></a>
</div>
</body>
</html>